#管理员的蓝图以及视图
from flask import Blueprint

from info.utils.common import user_status_monitoring

admin_blu= Blueprint('admin',__name__)

from .views import *


@admin_blu.before_request
@user_status_monitoring
def before_request():
    is_admin = session.get('is_admin',False)
    if not is_admin and not  request.url.endswith('/admin/login'):
        return redirect('/')

